import request from '@/utils/request'

// 创建权限
export function createSeekPermission(data) {
  return request({
    url: '/car/seek-permission/create',
    method: 'post',
    data: data
  })
}

// 更新权限
export function updateSeekPermission(data) {
  return request({
    url: '/car/seek-permission/update',
    method: 'put',
    data: data
  })
}

// 删除权限
export function deleteSeekPermission(id) {
  return request({
    url: '/car/seek-permission/delete?id=' + id,
    method: 'delete'
  })
}

// 获得权限
export function getSeekPermission(id) {
  return request({
    url: '/car/seek-permission/get?id=' + id,
    method: 'get'
  })
}

// 获得权限分页
export function getSeekPermissionPage(query) {
  return request({
    url: '/car/seek-permission/page',
    method: 'get',
    params: query
  })
}
// 获得权限
export function getSeekPermissionList() {
  return request({
    url: '/car/seek-permission/list',
    method: 'get',
  })
}
// 导出权限 Excel
export function exportSeekPermissionExcel(query) {
  return request({
    url: '/car/seek-permission/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
